package main

import "fmt"

type person struct {
	id int
	name string
	sex string
}

type student struct {
	person
	score int
}

func (p *person)PrintInfo(){
	fmt.Println("父类",p)
}

func (s *student)PrintInfo(){
	fmt.Println("子类",s)
}

func main() {
	s:=student{person{1,"zs","男"},99}

	s.PrintInfo()
	s.person.PrintInfo()
}
